package sort;

public class BubbleSortInt {
	private int alist[];
	private int temp;
	private int length;
	
	public BubbleSortInt(int aList[]){
		this.alist = aList;
		this.length=alist.length;
	}
	public void sort(){
		for(int i=0;i<length-1;i++){
			for(int j=i+1;j<length;j++){
				if(alist[i]>alist[j]){
					temp = alist [i];
					alist[i]=alist[j];
					alist[j]=temp;
				}
			}
		}
	}
	
	public void show(){
		for(int i=0;i<length;i++){
			System.out.print(alist[i]+"\t");
			if((i+1)%10==0) System.out.println();
		}
		System.out.println();
	}
	
}
